//
// Created by wze-zero on 2024/9/6 006.
//
#include <iostream>
#include <cmath>

using namespace std;

int main() {
    double num, money;
    char c;
    cin >> num >> c;
    if (num <= 1) {
        money = 20;
    } else {
        money = 20 + ceil(num - 1);
    }

    if (c == 'y') {
        money += 5;
    }
    cout << money << endl;
    return 0;
}